﻿@{
    ViewBag.Title = "Birthday";
}

<script type="text/javascript">

    $(document).ready(function () {
        $(".sliderDay").slider({
            range: "min",
            value: 7,
            min: 1,
            max: 365,
            slide: function (event, ui) {
                $(".sliderDayLabel").html(ui.value);
                $("#valDay").val(ui.value);
            },
            change: function (event, ui) {
                listBirthday.Refresh({ 'days': ui.value });
                listBirthday.PerformCallback({ 'days': ui.value });
            }
        });

        // <![CDATA[
        var v = $("#valDay").val();
        $("#valDay").change(function () {
            alert("clicked");
        });

    });
    // ]]> 

</script>

<div>
    <div>
        <div class="slider sliderDay sliderBlue "></div>
        <div class="field_notice" style="margin-bottom:10px;">Sinh nhật khách hàng trong vòng <span class="sliderDayLabel">7</span><span> ngày tới</span></div>
        <input type="hidden" id="valDay" value="7" />
    </div>
</div>

@Html.Action("listBirthdayPartial", "KhachHang", new { days = 7 })
